package com.linuxgt.android.fileapp.service;

import android.support.test.InstrumentationRegistry;
import android.util.Log;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;

/**
 * Created by liute on 2017/5/15.
 */
public class FileServiceTest {
    private FileService fileService;

    @Test
    public void save() throws Exception {

    }

    @Test
    public void read() throws Exception {
        String content=fileService.read("test");
        Log.i(getClass().getName(), content);
        if (content.startsWith("1234")) {
            Assert.assertEquals(1,1);
        }else{
            Assert.assertEquals(0,1);
        }
    }

    @Before
    public void init() throws Exception {
        fileService = new FileService(InstrumentationRegistry.getTargetContext());
    }
}